home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Mac OS USB DDK_v1.0.1 / Tools / USBDDKBuildAll next >
Encoding:
Text File  |  1998-09-03  |  2.6 KB  |  105 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        USBDDKBuildProject
  3. #
  4. #    Contains:    Build Script for USBDDK
  5. #
  6. #    Version:    xxx put version here xxx
  7. #
  8. #    Written by:    Craig Keithley
  9. #
  10. #    Copyright:    © 1997-1998 by Apple Computer, Inc., all rights reserved.
  11. #
  12. set Commands `Directory`Tools:,"{Commands}"
  13. export Commands
  14.  
  15. unset BuildTargets
  16.  
  17. set DebugBuild 0
  18. export DebugBuild
  19.  
  20. Set t7 `Date -n`
  21. Set t8 "`Date -s`"
  22.  
  23. Open "{Worksheet}"
  24.  
  25. Echo "#******************************************************************************************************"
  26. if "{1}" == 'clean'
  27.     Echo "# Clean & Build DDK drivers & examples"
  28.     Echo "#   Deleting all files in "{USBDDKObjects}
  29.     echo "Test" >"{USBDDKObjects}Test"
  30.     delete -i -y "{USBDDKObjects}"≈
  31.     
  32.     Echo "#   Deleting all files in "{USBDDKReleaseExtensions}
  33.     echo "Test" >"{USBDDKReleaseExtensions}Test"
  34.     delete -i -y "{USBDDKReleaseExtensions}"≈
  35. else
  36.     if "{1}" == 'full'
  37.         Echo "# Full build all USB drivers"
  38.     else
  39.         Echo "# Build all USB drivers"
  40.     end
  41. end
  42.     
  43. if `Exists "{USBDDKTargets}Drivers:"`
  44.     Echo "#   …Targets:Drivers folder still exists (no need to create it)"
  45. else
  46.     NewFolder "{USBDDKTargets}Drivers"
  47. end
  48.  
  49. if `Exists "{USBDDKTargets}Utilities:"`
  50.     Echo "#   …Targets:Utilities folder still exists (no need to create it)"
  51. else
  52.     NewFolder "{USBDDKTargets}Utilities"
  53. end
  54.  
  55. if `Exists "{USBDDKTargets}Maps:"`
  56.     Echo "#   …Targets:Maps folder still exists (no need to create it)"
  57. else
  58.     NewFolder "{USBDDKTargets}Maps"
  59. end
  60.  
  61.  
  62. if `Exists "{USBDDKFolder}Drivers"`
  63.     For i In `Files -af -f -d "{USBDDKFolder}Drivers"`                    # For all directories within the  Drivers folder....
  64.         (Evaluate "{i}" =~ /≈':'≈':'(≈)®1':'/) ∑ dev:null                # Get the name of the folder, put in ®1
  65.         Directory "{i}" 
  66.         set -e USBDDKDriverPath "{i}" 
  67.         set -e USBDDKDriver {®1}
  68.         set exit 0
  69.         execute USBDDKBuildDriver {1}
  70.     End
  71. End
  72.  
  73. if `Exists "{USBDDKFolder}Examples"`
  74.     For i In `Files -af -f -d "{USBDDKFolder}Examples"`                    # For all directories within the  Drivers folder....
  75.         (Evaluate "{i}" =~ /≈':'≈':'(≈)®1':'/) ∑ dev:null                # Get the name of the folder, put in ®1
  76.         Directory "{i}" 
  77.         set -e USBDDKDriverPath "{i}"
  78.         set -e USBDDKDriver {®1}
  79.         set exit 0
  80.         execute USBDDKBuildDriver {1}
  81.     End
  82. End
  83.  
  84.  
  85. directory "{USBDDKFolder}"
  86.  
  87. Set t2 `Date -n`
  88. Set t3 "`Date -s`"
  89.  
  90. echo "#   Started: "{t0}
  91. echo "# Completed: "{t3}
  92. echo "#"
  93.  
  94. Set t `Evaluate {t2} - {t7}`
  95. if "{1}" == 'clean'
  96.     Echo "# Time required to Clean & Build all of the drivers: {t} seconds."
  97. else
  98.     if "{1}" == 'full'
  99.         Echo "# Time required to do a full build all of the drivers: {t} seconds."
  100.     else
  101.         Echo "# Time required to do a build all of the drivers: {t} seconds."
  102.     end
  103. end
  104. Echo "#******************************************************************************************************"
  105.